#include<bits/stdc++.h>
using namespace std;
int arr[21][21];
int main(){
    int n;
    cin>>n;

    for(int i = 1;i<=n;i++){
        arr[i][1] = arr[i][i] = 1;
    }
    for(int i = 1;i<=n;i++){
        for(int j = 2;j<i;j++){
            arr[i][j] = arr[i-1][j]+arr[i-1][j-1];
        }
    }
    for(int i = 1;i<=n;i++){
        for(int j = 1;j<=i;j++){
            printf("%d ",arr[i][j]);
        }
        cout<<endl;
    }


    return 0;
}